//
//  PlistReadWriter.swift
//  W_BAR_FRAMEWORK
//
//  Created by LC_WJH on 2017/9/13.
//  Copyright © 2017年 LC_WJH. All rights reserved.
//

import Foundation
import HandyJSON
//info.plist文件运行时读(写)
public class PlistReadWriter{
    
    public static func getMainPlist()->MainPlistModel?{
        
        if let mianInfoDict = Bundle.main.infoDictionary {
            return MainPlistModel.deserialize(from:(mianInfoDict as NSDictionary));
            
            //what if changed
        }
        return nil;
    }
    
}

/*
 对infoDict的结构建模
 */


public class MainPlistModel:HandyJSON{
    public required  init(){}
    public var CFBundleURLTypes:[CFBundleURLTypesModel] = [CFBundleURLTypesModel]();
}
public class CFBundleURLTypesModel:HandyJSON{
    public required  init(){}
    public var CFBundleURLName:String = "";
    public var CFBundleURLSchemes:[String] = [String]();
}

 
